Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intercept Ollama errors before Webview, to display Download/Start options #3740

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fbricon
Copy link
Contributor

@fbricon fbricon commented Jan 15, 2025

Fixes #3674

Description

Ollama specific errors are intercepted in VS Code's webviewProtocol class, before they're propagated to the webview, so they can be treated the same way as in #3653, and allow users to start or download Ollama if needed.

Checklist

  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screenshots

Before:
Screenshot 2025-01-15 at 19 14 47

or, when #3725 is applied:
Screenshot 2025-01-15 at 12 24 14

After:
Screenshot 2025-01-15 at 18 59 17

Testing instructions

  • define an ollama model for chat
  • stop the ollama service
  • trying chatting

Copy link

netlify bot commented Jan 15, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit 16b9a21
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/6787fc2f7e2e2f00080816b7

@fbricon
Copy link
Contributor Author

fbricon commented Jan 15, 2025

I decided to remove the Documentation option shown during completion failure, when ollama is not started:

  • so both chat and completion failures show the consistent messages
  • the documentation link is irrelevant when ollama is stopped

@fbricon
Copy link
Contributor Author

fbricon commented Jan 16, 2025

so actually this PR is based on top of #3725, leveraging the change in the respond signature (now allowing type any) https://github.com/continuedev/continue/pull/3725/files#diff-d513811389b8716365ea98f8def6c27c9a3ad66fab169690aeb5f67a40497a2dR58

So do not merge this before #3725, or else there will be a compilation error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When Ollama is stopped, the chat window shows an unactionable error
2 participants